<?php
require_once dirname(__DIR__)."/login_filter.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\cls\tom\Tools;
use app\model\Users;
//分页
$page = isset($_REQUEST["page"]) ? intval($_REQUEST["page"]) : 1;
$page = $page > 0 ? $page : 1;
$pageSize = 200;

if(empty($_REQUEST['uuid'])){
    Response::output(-1,"缺少参数");
}
$other_uuid=$_REQUEST['uuid'];//他人uuid
$uuid=$Auth['uuid'];//我的uuid
//实例化数据库
$db = SysResource::getDB(false);
$Users = new Users($db);
$da=$Users->other_material($page,$pageSize,$other_uuid);
$da1=[];
if(empty($da)){
    Response::output(0,"查询成功",[],0);
}else{
    foreach($da['row'] as $k=>&$v){
        $v['count_material_love_10']=round($v['count_material_love']*1.7);
        $v['count_material_share_10']=round($v['count_material_share']*1.7);
        if(empty($v['share_pic'])){
            $v['share_pic']="";
        }
        if(empty($v['video_desc'])){
            $v['video_desc']="";
        }
    }
    Response::output(0,"查询成功",$da['row'],$da['total']);
}
